//----------------------------------------------------------------------------
#ifndef MainFormH
#define MainFormH
//----------------------------------------------------------------------------

#include "Log.h"
#include "ConfigForm.h"
#include <ActnList.hpp>
#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include <StdActns.hpp>
#include <StdCtrls.hpp>
#include <ToolWin.hpp>
//----------------------------------------------------------------------------
#include <stack>
#include <string>

#include "Config.h"
#include "Plugin.h"

using namespace std;

class TSDIAppForm : public TForm
{
__published:
    TOpenDialog *OpenDialog;
    TSaveDialog *SaveDialog;
    TToolBar *ToolBar1;
    TToolButton *ToolButton9;
    TToolButton *ToolButton1;
    TToolButton *ToolButton2;
    TToolButton *ToolButton3;
    TToolButton *ToolButton4;
    TToolButton *ToolButton5;
    TToolButton *ToolButton6;
    TActionList *ActionList1;
    TAction *FileNew1;
    TAction *FileOpen1;
    TAction *FileSave1;
    TAction *FileSaveAs1;
    TAction *FileExit1;
    TEditCut *EditCut1;
    TEditCopy *EditCopy1;
    TEditPaste *EditPaste1;
    TAction *HelpAbout1;
    TStatusBar *StatusBar;
    TImageList *ImageList1;
    TMainMenu *MainMenu1;
    TMenuItem *File1;
    TMenuItem *FileNewItem;
    TMenuItem *FileOpenItem;
    TMenuItem *FileSaveItem;
    TMenuItem *FileSaveAsItem;
    TMenuItem *N1;
    TMenuItem *FileExitItem;
    TMenuItem *Edit1;
    TMenuItem *CutItem;
    TMenuItem *CopyItem;
    TMenuItem *PasteItem;
    TMenuItem *Help1;
    TMenuItem *HelpAboutItem;
        TToolButton *ToolButton7;
        TToolButton *ToolButton10;
        TToolButton *ToolButton13;
        TToolButton *ToolButton12;
        TToolButton *ToolButton15;
        TToolButton *ToolButton16;
        TMemo *Memo1;
    TButton *Button1;
        void __fastcall FileNew1Execute(TObject *Sender);
        void __fastcall FileOpen1Execute(TObject *Sender);
        void __fastcall FileSave1Execute(TObject *Sender);
        void __fastcall FileExit1Execute(TObject *Sender);
        void __fastcall HelpAbout1Execute(TObject *Sender);
        void __fastcall SaveAll(TObject *Sender);
        void __fastcall ToolButton15Click(TObject *Sender);
        void __fastcall ToolButton16Click(TObject *Sender);
    void __fastcall ToolPanelSearchBtnClick(TObject *Sender);
    void __fastcall ToolButton7Click(TObject *Sender);
private:
        Log *SourceLog;
        stack<Log*> Stack;
        Config *config;
        Plugin *plugin;
public:
    virtual __fastcall TSDIAppForm(TComponent *AOwner);

    void clear();
    void FindLines();
    void SetColored(TStringList * tl);
    void assignLog(Log *log);
};
//----------------------------------------------------------------------------
extern TSDIAppForm *SDIAppForm;
//----------------------------------------------------------------------------
#endif